]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
inputMethod: Also forward TERMINAL input purpose
authorJonas Ådahl <jadahl@gmail.com>
Fri, 14 Oct 2022 19:41:00 +0000 (21:41 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 14 Oct 2022 19:59:21 +0000 (21:59 +0200)
It was added relatively recently (1.5.24), so check if it exists first.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5958
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2511>

js/misc/inputMethod.js

index 7bf6646d80d992b39b76a3563c5a7433e33f9412..cb70f93f7aad2593ea2be3f8af504bbf9defb627 100644 (file)
@@ -273,6 +273,9 @@ var InputMethod = GObject.registerClass({
             ibusPurpose = IBus.InputPurpose.NAME;
         else if (purpose == Clutter.InputContentPurpose.PASSWORD)
             ibusPurpose = IBus.InputPurpose.PASSWORD;
+        else if (purpose === Clutter.InputContentPurpose.TERMINAL &&
+                 IBus.InputPurpose.TERMINAL)
+            ibusPurpose = IBus.InputPurpose.TERMINAL;
 
         this._setTerminalMode(
             purpose === Clutter.InputContentPurpose.TERMINAL);